﻿Imports Microsoft.VisualBasic

Public Class DBPurchaseRequestHdrSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public PurReqID As New TableField("PurReqID", Data.SqlDbType.Int)
    Public PurReqNo As New TableField("PurReqNo", Data.SqlDbType.Int)
    Public PurReqDate As New TableField("PurReqDate", Data.SqlDbType.DateTime)
    Public PurReqType As New TableField("PurReqType", Data.SqlDbType.Int)
    Public CostCenter As New TableField("CostCenter", Data.SqlDbType.Int)
    Public MainCostCenter As New TableField("MainCostCenter", Data.SqlDbType.Int)
    Public Remarks As New TableField("Remarks", Data.SqlDbType.NVarChar)
    Public RecordStatus As New TableField("RecordStatus", Data.SqlDbType.Int)
    Public LastUpdateBy As New TableField("LastUpdateBy", Data.SqlDbType.NVarChar)
    Public LastUpdateDate As New TableField("LastUpdateDate", Data.SqlDbType.DateTime)

    Sub New()
        MyBase.StoredProcedureName = "PurchaseRequestHdrSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal PurReqID As String = "", _
                                 Optional ByVal PurReqNo As String = "", _
                                 Optional ByVal PurReqDate As String = "", _
                                 Optional ByVal PurReqType As String = "", _
                                 Optional ByVal CostCenter As String = "", _
                                 Optional ByVal MainCostCenter As String = "", _
                                 Optional ByVal Remarks As String = "", _
                                 Optional ByVal RecordStatus As String = "", _
                                 Optional ByVal LastUpdateBy As String = "", _
                                 Optional ByVal LastUpdateDate As String = "") As Object

        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.PurReqID.SetValue(PurReqID, MyBase.FieldsArrayList)
        Me.PurReqNo.SetValue(PurReqNo, MyBase.FieldsArrayList)
        Me.PurReqDate.SetValue(PurReqDate, MyBase.FieldsArrayList)
        Me.PurReqType.SetValue(PurReqType, MyBase.FieldsArrayList)
        Me.CostCenter.SetValue(CostCenter, MyBase.FieldsArrayList)
        Me.MainCostCenter.SetValue(MainCostCenter, MyBase.FieldsArrayList)
        Me.Remarks.SetValue(Remarks, MyBase.FieldsArrayList)
        Me.RecordStatus.SetValue(RecordStatus, MyBase.FieldsArrayList)
        Me.LastUpdateBy.SetValue(LastUpdateBy, MyBase.FieldsArrayList)
        Me.LastUpdateDate.SetValue(LastUpdateDate, MyBase.FieldsArrayList)

        Return MyBase.QueryDatabase(QueryType)
    End Function

End Class
